package com.project.bean;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.util.List;

@TableName("t_role")
public class RoleBean {
    @TableId(value = "pk_roleId",type = IdType.AUTO)
    private Integer id;
    @TableField("r_name")
    private String name;
    @TableField(exist = false)
    private List<GradeBean> gradeBeans;

    public RoleBean() {
    }

    public RoleBean(String name) {
        this.name = name;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public List<GradeBean> getGradeBeans() {
        return gradeBeans;
    }

    public void setGradeBeans(List<GradeBean> gradeBeans) {
        this.gradeBeans = gradeBeans;
    }

    @Override
    public String toString() {
        return "RoleBean{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", gradeBeans=" + gradeBeans +
                '}';
    }
}
